<?php
class LanguagesHelper extends AppHelper{
	
	var $helpers = array('Html', 'Form');
	
	function beforeRender(){
		parent::beforeRender();
		$this->View =& ClassRegistry::getObject('view');
	}
	
	public function selectbox($field=null,$params_=array()){
		$languages_ = Configure::read('Config.languages');
		$languages = array();
		foreach ($languages_ as $l => $name) {
			$languages[$l] = $name['name'];
		}
		$params = array_merge(array('options'=>$languages),$params_);
		
		return $this->Form->input($field,$params);
	}

}